package com.uzai.console.service.md.mdexchange;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.md.mdexchange.MdExchangeIdDto;
import com.uzai.console.dto.md.mdexchange.MdExchangeQuery;
import com.uzai.console.dto.md.mdexchange.MdExchangeUpdateExptimeDto;
import com.uzai.console.entity.MdActivity;
import com.uzai.console.entity.MdExchange;
import com.uzai.console.vo.md.mdexchange.MdExchangeVo;

import java.util.List;

/**
 * @author liuqi
 * @date 2021年08月13日 11:33
 */
public interface MdExchangeService {

    /**
     * 查询免单活动列表
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param mdExchangeQuery
     * @return null
     */
    Page<MdExchangeVo> findMdExchangeList(MdExchangeQuery mdExchangeQuery);

    /**
     * 查询免单活动详情
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param mdExchangeIdDto
     * @return null
     */
    MdExchangeVo findMdExchange(MdExchangeIdDto mdExchangeIdDto);

    /**
     * 删除免单兑换记录
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param mdExchangeIdDto
     * @return null
     */
    void deleMdExchange(MdExchangeIdDto mdExchangeIdDto);

    /**
     * 免单兑换记录修改有效期
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param mdExchangeUpdateExptimeDto
     * @return null
     */
    void updateExptime(MdExchangeUpdateExptimeDto mdExchangeUpdateExptimeDto);


    /**
     * 自动检测免单兑换记录是否过期
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param mdExchange
     * @return null
     */
    void autoCheckMdExchangeExpired(MdExchange mdExchange);

    Integer countPayOrderWithGoodsId(Long goodsId, Long activityId, Long merId);

    List<MdExchangeVo> findMdExchangePayList(MdExchangeQuery mdExchangeQuery);
}
